﻿#region Imports
using System.ComponentModel;
using System.Windows.Forms;
using CommonUtilities.Util;
#endregion

namespace CommonUtilities.Controls
{
    /// <summary>
    /// CommonUtilities ToolTip
    /// (inherited from System.Windows.Forms.ToolTip)
    /// </summary>
    public class CUtil_ToolTip : ToolTip
    {
        #region Constructors
        /// <summary>
        /// Initializes a new instance of the System.Windows.Forms.ToolTip class
        ///     without a specified container
        /// </summary>
        public CUtil_ToolTip()
            : base()
        {
            InitializeControl();
        }

        /// <summary>
        /// Initializes a new instance of the System.Windows.Forms.ToolTip class
        ///     with a specified container
        /// </summary>
        /// <param name="cont">An System.ComponentModel.IContainer that represents
        ///     the container of the System.Windows.Forms.ToolTip</param>
        public CUtil_ToolTip(IContainer cont)
            : base(cont)
        {
            InitializeControl();
        }
        #endregion

        #region Methods
        /// <summary>
        /// Initializes design of CommonUtilities tooltip
        /// </summary>
        private void InitializeControl()
        {
            this.ToolTipIcon = ToolTipIcon.Info;
            this.ToolTipTitle = "Info:";
            this.ShowAlways = false;
            this.UseAnimation = true;
            this.UseFading = true;
        }

        public override string ToString()
        {
            return Utilities.ToString(this);
        }
        #endregion
    }
}
